/**
 * 
 */
package com.inspectortime.domain.impl;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.inspectortime.common.PersistentEntityBase;
import com.inspectortime.domain.RealEstateAgent;
import com.inspectortime.domain.type.Name;
import com.inspectortime.timestamp.Timestamped;

/**
 * 
 * 
 */
@Entity
@Table(name = "REAL_ESTATE_AGENT")
public class RealEstateAgentImpl extends PersistentEntityBase implements
		RealEstateAgent, Timestamped {

	private String cellPhone;
	private String company;
	private String office;
	private String email;
	
	@Transient
	private String emailConfirm;
	private String code;
	private String fax;
	private String homePhone;
	private Name name;
	private String otherPhone;
	private Date createdTime;
	private Date lastModifiedTime;
	private Date dateDeleted;
	

	public RealEstateAgentImpl() {
	}

	public RealEstateAgentImpl(Name name) {
		this.name = name;
	}

	public Date getCreatedTime() {
		return createdTime;
	}

	public void setCreatedTime(Date createdTime) {
		this.createdTime = createdTime;
	}

	public Date getLastModifiedTime() {
		return lastModifiedTime;
	}

	public void setLastModifiedTime(Date lastModifiedTime) {
		this.lastModifiedTime = lastModifiedTime;
	}
	
	@Column( length = 20 )
	public String getCode() {
		return this.code;
	}
	
	public void setCode(String code) {
		this.code = code;
	}

	@Column( length = 20 )
	public String getCellPhone() {
		return cellPhone;
	}

	@Column( length = 100 )
	public String getCompany() {
		return company;
	}

	@Column( length = 100 )
	public String getOffice() {
		return office;
	}

	@Column( length = 100 )
	public String getEmail() {
		return email;
	}

	@Column( length = 20 )
	public String getFax() {
		return fax;
	}

	@Column( length = 20 )
	public String getHomePhone() {
		return homePhone;
	}

	public Name getName() {
		return name;
	}

	@Column( length = 20 )
	public String getOtherPhone() {
		return otherPhone;
	}

	public void setCellPhone(String cellPhone) {
		this.cellPhone = cellPhone;
	}

	public void setCompany(String company) {
		this.company = company;
	}
	
	public void setOffice(String office) {
		this.office = office;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getEmailConfirm() {
		return emailConfirm;
	}

	public void setEmailConfirm(String emailConfirm) {
		this.emailConfirm = emailConfirm;
	}
	
	public void setFax(String fax) {
		this.fax = fax;
	}

	public void setHomePhone(String homePhone) {
		this.homePhone = homePhone;
	}

	public void setName(Name name) {
		this.name = name;
	}

	public void setOtherPhone(String otherPhone) {
		this.otherPhone = otherPhone;
	}
	
	@Transient
	public boolean isDeleted() {
		return dateDeleted != null;
	}

	public Date getDateDeleted() {
		return dateDeleted;
	}

	public void setDateDeleted(Date dateDeleted) {
		this.dateDeleted = dateDeleted;
	}


}
